﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace CRMWeb.Pages.AM
{
    public partial class ChangeSchAmount : CRMWeb.Utilities.BasePage
    {
        string digitalKey = WebConfigurationManager.AppSettings["EziDebitDigitalKey"].ToString();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnChangeAmt_Click(object sender, EventArgs e)
        {
            
            CRMAdapter.PayByEzidebit.ChangeScheduledAmounts(digitalKey, txtCusRefE.Text, "", Convert.ToInt32(txtPayNum.Text), "", Convert.ToInt32(txtNewPayAmt.Text), txtAllFuturePayment.Text, txtManualPayments.Text, "");
            ClearAll();
        }

        //Method to clear all fields
        public void ClearAll()
        {

            digitalKey = "";
            txtCusRefE.Text = "";
            txtPayNum.Text = "";
            txtNewPayAmt.Text = "";
            txtAllFuturePayment.Text = "";
            txtManualPayments.Text = "";


        }
    }
}